<?php
  add_action('admin_menu', 'myconfig_admins_visas');
  function myconfig_admins_visas()
  {   
     add_menu_page( 'Visa', 'Visa', 'administrator', 'travel-visa-setting', 'visas_theme_setting');
  }  
  function visas_theme_setting()
  {
  ?>
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
	<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />	
	<title>Order Detail</title>
	<script src="<?php bloginfo('template_url');?>/orders/js/jquery.js" type="text/javascript" ></script>
	<script src="<?php bloginfo('template_url');?>/orders/js/customJS.js" type="text/javascript" ></script>
		
	<link href="<?php bloginfo('template_url');?>/orders/css/style.css" rel="stylesheet" type="text/css" />
	<link href="<?php bloginfo('template_url');?>/orders/css/orders.css" rel="stylesheet" type="text/css" />
	<link href="<?php bloginfo('template_url');?>/orders/css/tabcontent.css" rel="stylesheet" type="text/css" />
	<!-- 
	<script src="<?php bloginfo('template_url');?>/admins/js/tabcontent.js" 			type="text/javascript" ></script>  
	 -->		
	</head>	
	<body>	
	<?php 
	$urls = get_bloginfo('home')."/wp-admin/admin.php?page=travel-visa-setting";
	if(isset($_GET['del'])!=null && isset($_GET['cus'])!=null)
	{
		
		$agentID = $_GET['del'];
		$cusID   = $_GET['cus'];
		db_delete_visas_by_id($agentID, $cusID);
		wp_redirect($urls);
	}
	
	?>	
	<?php
                	$acti = $_GET['action']; 
                	?>		
			<div id="my_theme_options_content" style="width: 98%;">
                <!-- Tab choosen -->
                
		   <ul id="countrytabs" class="shadetabs">          
		       <li><a <?php if($acti=="travel-visa-setting") echo 'class="tour-menu-active"';?> href="<?php bloginfo('home');?>/wp-admin/admin.php?page=travel-visa-setting" >Visa Booked</a></li> 	 	
		       <li><a <?php if($acti=="type_of_visa") echo 'class="tour-menu-active"';?> href="<?php bloginfo('home');?>/wp-admin/admin.php?page=travel-visa-setting&action=type_of_visa" >Type of Visa</a></li>
		       <li><a <?php if($acti=="purpose_of_visit") echo 'class="tour-menu-active"';?> href="<?php bloginfo('home');?>/wp-admin/admin.php?page=travel-visa-setting&action=purpose_of_visit" >Purpose of vist</a></li>
		       <li><a <?php if($acti=="airport") echo 'class="tour-menu-active"';?> href="<?php bloginfo('home');?>/wp-admin/admin.php?page=travel-visa-setting&action=airport" >Airport</a></li>
		           	 	
           </ul>
           <!-- End Tab choosen -->   
           <div class="box-tabs">    
           <?php 
           if(isset($_GET['visa'])!=null && isset($_GET['cus'])!=null)
           {           		
				include TEMPLATEPATH.'/orders/visas/view-detail-update-visa.php';
           }
  			else if($_GET['page']=="travel-visa-setting" && $_GET['action']=="type_of_visa")
           {             		
				include TEMPLATEPATH.'/orders/visas/view-update-type-of-visa.php';
           }
 		   else if($_GET['page']=="travel-visa-setting" && $_GET['action']=="purpose_of_visit")
           {           		
				include TEMPLATEPATH.'/orders/visas/view-update-purpose-of-visit-visa.php';
           }
   			else if($_GET['page']=="travel-visa-setting" && $_GET['action']=="airport")
           {           		
				include TEMPLATEPATH.'/orders/visas/view-update-airport-visa.php';
           }
           else 
           {
           		include TEMPLATEPATH.'/orders/visas/view-booked-visa.php';
           }
           ?>                               
            <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->	                    
	       </div>		             					             
    	</div>
    	</body>
	</html>
  <?php 	
  }
?>